<script>
			var module_inits = [];
			
			function load_init_modules() {
				for (var i = 0; i < module_inits.length; i++) {
					module_inits[i]();
				}
			}
			
			function call_me(fun) {
				module_inits.push(fun);
			}
			onload = load_init_modules;
		</script>

		<script>
			var slider_images_url = [
			{volist name='pics' id='vo'}
			'{$vo.url}',
			{/volist}
			];
			var e_desc = '{$title}';
		</script>
<style type="text/css">
	
*
{
    padding: 0px;
    margin: 0px;
    -webkit-box-sizing: border-box;
}

body
{
    background-color: black;
}

#container
{
    width: 500px;
    height: 100%;
    position: absolute;
    overflow: hidden;
}
#container >img,#container > div
{
    position: absolute;
}
#change_bg
{
    top: 503px;
}
#sky_rotate
{
    top: 0px;
    left: -80px;
    -webkit-animation: rotateing 50s linear infinite;
}
#lake_rotate
{
    top: 510px;
    left: -100px;
    width: 625px;
    height: 504px;
    -webkit-transform: scale(0.8,0.2);
    opacity: 0.3;
    /*-webkit-animation: lake_rotate 35s linear infinite;*/
}
#lake_in
{
    position: absolute;
    -webkit-animation: rotateing_back 50s linear infinite;
}
#deng1
{
    left: 174px;
    width: 15px;
    top: 700px;
    height: 20px;
    -webkit-animation: fadechange 2s linear infinite alternate;
}
#deng2
{
    left: 270px;
    top: 700px;
    -webkit-animation: fadechange 2s 1s linear infinite alternate;
}
#deng3
{
    left: 310px;
    top: 700px;
    width: 12px;
    -webkit-animation: fadechange 2s 0.5s linear infinite alternate;
}
#deng4
{
    left: 382px;
    top: 701px;
    width: 9px;
    -webkit-animation: fadechange 2s 1.5s linear infinite alternate;
}
#deng5
{
    left: 467px;
    top: 705px;
    -webkit-animation: fadechange 2s 2s linear infinite alternate;
}
#div1>div
{
    position: absolute;
}
.divh
{
    left: 17px;
    top: 192px;
    position: absolute;
    background-color: #fff;
    width: 467px;
    height: 290px;
    overflow: hidden;
}
.divv
{
    left: 62px;
    top: 108px;
    position: absolute;
    background-color: #fff;
    width: 375px;
    height: 520px;
    overflow: hidden;
}
.kuangv
{
    left: 43px;
    top: 86px;
    position: absolute;
}
.kuangh
{
    left: 17px;
    top: 170px;
    position: absolute;
}
#div1h,#div1v,#div2v,#div2h
{
    /*-webkit-transform: translate(500px,0px);from liangziyun*/
    position: absolute;
}
#div1,#div2
{
    -webkit-transform: translate(500px,0px);
    width: 500px;
    height: 815px;
}
</style>
<style type="text/css">
@-webkit-keyframes rotateing
{
    from  {-webkit-transform: rotate(0deg);}
    to    {-webkit-transform: rotate(360deg);}
}
@-webkit-keyframes rotateing_back
{
    from  {-webkit-transform: rotate(360deg);}
    to    {-webkit-transform: rotate(0deg);}
}
@-webkit-keyframes fadechange
{
    from  {opacity: 1}
    to    {opacity: 0.5}
}
@-webkit-keyframes fadein_left
{
    from  {opacity: 0;-webkit-transform: translate(500px,0px);}
    to    {opacity: 1;-webkit-transform: translate(0px,0px);}
}
@-webkit-keyframes fadeout_left
{
    from  {opacity: 1;-webkit-transform: translate(0px,0px);}
    to    {opacity: 0;-webkit-transform: translate(-500px,0px);}
}
@-webkit-keyframes fadeout_down
{
    from  {opacity: 1;-webkit-transform: translate(0px,0px);}
    to    {opacity: 0;-webkit-transform: translate(0px,500px);}
}
@-webkit-keyframes fadein_down
{
    from  {opacity: 0;-webkit-transform: translate(0px,-500px);}
    to    {opacity: 1;-webkit-transform: translate(0px,0px);}
}
@-webkit-keyframes fadein_up
{
    from  {opacity: 0;-webkit-transform: translate(0px,500px);}
    to    {opacity: 1;-webkit-transform: translate(0px,0px);}
}
@-webkit-keyframes fadeout_up
{
    from  {opacity: 1;-webkit-transform: translate(0px,0px);}
    to    {opacity: 0;-webkit-transform: translate(-500px,0px);}
}
@-webkit-keyframes fadeout_center
{
    from  {opacity: 1;-webkit-transform: scale(1);}
    to    {opacity: 0;-webkit-transform: scale(.4);}
}
</style>

<div id='container'>
    

    <img id='change_bg' src='__DIR__{$dir}/img/01.jpg'>
    <img src='__DIR__{$dir}/img/bg.png'>
    <img id='sky_rotate' src='__DIR__{$dir}/img/xing.png'>

    <div id='lake_rotate'>
        <img id='lake_in' src='__DIR__{$dir}/img/xing.png'>
    </div>

    <img id='deng1' src='__DIR__{$dir}/img/01.png'>
    <img id='deng2' src='__DIR__{$dir}/img/01.png'>
    <img id='deng3' src='__DIR__{$dir}/img/01.png'>
    <img id='deng4' src='__DIR__{$dir}/img/01.png'>
    <img id='deng5' src='__DIR__{$dir}/img/01.png'>

    <div id='pagetitle' style='position:absolute;width:398px;height:250px;top:192px;left:51px;font-size:40px;color:#301B5F;-webkit-transform-origin: 100% 50%;-webkit-transform: translate(500px,0px)'>
        <img src='__DIR__{$dir}/img/bt.png'>
        <div style='position:absolute;width:324px;height:250px;top:0px;left:35px;overflow:hidden;'>
            <div style='position:absolute;width:324px;height:250px;display:table;overflow:hidden;'>
                <div id='titlecontent' style='width:324px;height:250px;vertical-align:middle;display:table-cell;text-align:center;font-size:30px;line-height:50px;'></div>
            </div>
        </div>
    </div>

    <div id='div1'>
        <div id='div1h'>
            <img class='kuangh' src='__DIR__{$dir}/img/kuang.png'>
            <div class='divh'>
               <img id='img1h' style='position:absolute'>
            </div>
        </div>

        <div id='div1v'>
            <img class='kuangv' src='__DIR__{$dir}/img/kuang2.png'>
            <div class='divv'>
                <img id='img1v' style='position:absolute'>
            </div>
        </div>
    </div>

    <div id='div2'>
        <div id='div2h'>
            <img class='kuangh' src='__DIR__{$dir}/img/kuang.png'>
            <div class='divh'>
               <img id='img2h' style='position:absolute'>
            </div>
        </div>

        <div id='div2v'>
            <img class='kuangv' src='__DIR__{$dir}/img/kuang2.png'>
            <div class='divv'>
                <img id='img2v' style='position:absolute'>
            </div>
        </div>
    </div>
    

</div>



<script>

var change_list = ['__DIR__{$dir}/img/01.jpg','__DIR__{$dir}/img/02.jpg','__DIR__{$dir}/img/03.jpg','__DIR__{$dir}/img/04.jpg','__DIR__{$dir}/img/05.jpg','__DIR__{$dir}/img/06.jpg','__DIR__{$dir}/img/07.jpg','__DIR__{$dir}/img/08.jpg','__DIR__{$dir}/img/09.jpg','__DIR__{$dir}/img/10.jpg','__DIR__{$dir}/img/11.jpg','__DIR__{$dir}/img/12.jpg',]

var image_size_width=[];
var image_size_height=[];
var image_url_index=0;
var have_num = 0;
var error_num = 0;
var canshow = true;
var reshow = false;
var timeout0;
var timeout1;
var timeout2;
var timeout3;
var timeout4;
var timeout5;
var timeout6;

var delaytime=4000;
function id(name)
{
    return document.getElementById(name);
}
function load_images()
{
    change_bg();
    load_imagesbegin();
}
function load_imagesbegin()
{
    reshow = false;
    image_size_width=[];
    image_size_height=[];
    Onload_imgs_url=[];
    image_url_index=0;
    have_num = 0;
    error_num = 0;
    begin_titletime = new Date();
    begin_titletime = begin_titletime.getTime();
    showtitle();
    canshow = true;

    bl_keepload = 'first';
    step_load();       
}

//每次执行加载后5张图片
var bl_keepload = 'first';
var step_loadnum = 5;
function step_load()
{
    var load_num = 0
    //初步加载X张
    if(image_url_index  == 0 && bl_keepload == 'first')
    {
        console.log('loading continue');
        if(slider_images_url.length > step_loadnum)
        {
            load_num = step_loadnum;
            bl_keepload = 'next';
        }
        else
        {
            load_num = slider_images_url.length;
            bl_keepload = 'end';
        }
        for(var i = 0; i< load_num; i++)
        {
            var img=new Image();
            img.index=i;
            img.src=slider_images_url[i];
            img.onload=image_onload;
            img.onerror= image_onerror;
            Onload_imgs_url[i] = 'loading';
        }
    }
    else if(bl_keepload == 'end')
    {
        return;
    }
    else
    {
         console.log('loading continue');
        if(slider_images_url.length - image_url_index >step_loadnum*2)
        { 
            load_num = step_loadnum;
        }
        else
        {
            load_num = slider_images_url.length - image_url_index - step_loadnum;
            bl_keepload = 'end';
        }
        for(var i = image_url_index +step_loadnum; i< image_url_index + step_loadnum + load_num; i++)
        {
            var img=new Image();
            img.index=i;
            img.src=slider_images_url[i];
            img.onload=image_onload;
            img.onerror= image_onerror;
            Onload_imgs_url[i] = 'loading';
        }
    }
}

function image_onerror(event)
{
    var img = event.target;
    var index = img.index;
    if(index<step_loadnum)
        error_num ++;
    Onload_imgs_url[index] = 'not find';
    // console.log(Onload_imgs_url[index]);
    // console.log(have_num + '-' + error_num);
    if((have_num+error_num >= step_loadnum || slider_images_url.length == (have_num+error_num)) && canshow == true)
    {   
        reshow = false;
        canshow =false;
        if(have_num == 0)
            return;
        var end_titletime = new Date();
        end_titletime = end_titletime.getTime();
        var dis_titletime = Math.abs(end_titletime-begin_titletime);
        if(dis_titletime>delaytime)
        {
            liangziyun_fromkawa();
        }
        else
        {
            dis_titletime = delaytime- dis_titletime;
            timeout0 = setTimeout(function()
                {
                    liangziyun_fromkawa();
                },dis_titletime);
        }
    }
}

function image_onload(event)
{
    if(reshow == true)
        return;

    var img = event.target;
    var index = img.index;

    if(index<step_loadnum)
    {
        have_num++;
    }
    Onload_imgs_url[index] = img.src;
    image_size_height[index] = img.height;
    image_size_width[index] = img.width;

    console.log(Onload_imgs_url[index]);
    // console.log(have_num + '-' + error_num);

    if((have_num + error_num >= step_loadnum ||slider_images_url.length == (have_num+error_num)) && canshow == true)
    {   
        reshow = false;
        canshow =false;
        if(have_num == 0)
            return;
        var end_titletime = new Date();
        end_titletime = end_titletime.getTime();
        var dis_titletime = Math.abs(end_titletime-begin_titletime);
        if(dis_titletime>delaytime)
        {
            liangziyun_fromkawa();
        }
        else
        {
            dis_titletime = delaytime- dis_titletime;
            timeout0 = setTimeout(function()
                {
                    liangziyun_fromkawa();
                },dis_titletime);
        }

    }
}
function showtitle()
{
    id('pagetitle').style.webkitAnimation = 'fadein_left 1.5s cubic-bezier(.27,.4,.83,1) both';
    id('titlecontent').innerHTML = e_desc;
}
function liangziyun_fromkawa()
{
    id('pagetitle').style.webkitAnimation = 'fadeout_left 2s ease-in both';
    showkawa1();
}
function showkawa1()
{
    setImage('1');
    id('div1').style.webkitAnimation = 'fadein_left 2s ease-out both';
    timeout1 = setTimeout(showkawa2,5000)
}
function showkawa2()
{
    setImage('2');
    id('div1').style.webkitAnimation = 'fadeout_left 1.5s ease-in both';
    id('div2').style.webkitAnimation = 'fadein_left 2s ease-out both';
    timeout2 = setTimeout(showkawa3,5000)
}
function showkawa3()
{
    setImage('1');
    id('div2').style.webkitAnimation = 'fadeout_left 1.5s ease-in both';
    id('div1').style.webkitAnimation = 'fadein_left 2s ease-out both';
    timeout3 = setTimeout(showkawa4,5000)
}
function recordname()
{
    // var src='http://photo.kagirl.cn/kphoto/recordpv.php?id='+window.location.host;
    // if(typeof(XMLHttp)!="undefined")
    // {
    //     XMLHttp.sendReq('GET', src, '',function(obj){});
    // }
}
function showkawa4()
{
    setImage('2');
    id('div1').style.webkitAnimation = 'fadeout_down 1.5s ease-in both';
    id('div2').style.webkitAnimation = 'fadein_down 2s ease-out both';
    timeout4 = setTimeout(showkawa5,5000)
}

function showkawa5()
{
    setImage('1');
    id('div2').style.webkitAnimation = 'fadeout_up 1.5s ease-in both';
    id('div1').style.webkitAnimation = 'fadein_up 2s ease-out both';
    timeout5 = setTimeout(showkawa6,5000)
}

function showkawa6()
{
    setImage('2');
    id('div1').style.webkitAnimation = 'fadeout_center 1.5s ease-in both';
    id('div2').style.webkitAnimation = 'fadein_left 2s ease-out both';
    timeout6 = setTimeout(showkawa3,5000);
}

function change_bg()
{
    change_div = id('change_bg');
    change_index = 0;
    recordname();
    setInterval(changing,100)
}

function changing()
{
    change_div.src=change_list[change_index];
    change_index++;
    if(change_index == change_list.length)
        change_index = 0;
}

function setImage(idname)
{
    if(reshow == true)
        return;

    while(Onload_imgs_url[image_url_index] == 'not find' || Onload_imgs_url[image_url_index] == 'loading')
    {
        image_url_index++;
        if(image_url_index == Onload_imgs_url.length)
            image_url_index = 0;
    }

     if(image_url_index % step_loadnum == 0)
    {
        step_load();
    }
    console.log('setimg:' + Onload_imgs_url[image_url_index]);

    var img_bili = image_size_width[image_url_index]/image_size_height[image_url_index];
    var div;
    var div1;
    var divname;

    if(img_bili > 1)
    {
        divname = idname + 'h';
        div = id('div'+idname+'h');
        div1 = id('div'+idname+'v');
        width = 467;
        height = 300;
    }
    else
    {
        divname = idname + 'v';
        div = id('div'+idname+'v');
        div1 = id('div'+idname+'h');
        width = 375;
        height = 520;
    }

    div.style.display = 'block';
    div1.style.display = 'none';

    var img = id('img'+divname);
    img.src = Onload_imgs_url[image_url_index];

    if(img_bili > (width/height))
    {
        img.style.top = '0px';
        img.style.height = height + 'px';
        img.style.width = height*img_bili + 'px';
        img.style.left = -((height*img_bili-width)/2)+'px';
    }
    else
    {
        img.style.left = '0px';
        img.style.width = width+'px';
        img.style.height = width/img_bili + 'px';
        img.style.top = -((width/img_bili-height)/2) + 'px';
    }

    image_url_index++;
    if(image_url_index==Onload_imgs_url.length)
        image_url_index = 0;
}


call_me(load_images);

function reload_scene()
{
    clearnode();
    reshow = true;
    setTimeout(load_imagesbegin,100);
}

function clearnode()
{
    id('div1').style.webkitAnimation = '';
    id('div2').style.webkitAnimation = '';
    id('pagetitle').style.webkitAnimation = '';
    clearTimeout(timeout0);
    clearTimeout(timeout1);
    clearTimeout(timeout2);
    clearTimeout(timeout3);
    clearTimeout(timeout4);
    clearTimeout(timeout5);
    clearTimeout(timeout6);
}


</script>



	<link type="text/css" rel="stylesheet" href="__DIR__{$dir}/css/guanzhu.css?ver=3" />
	<link rel="stylesheet" type="text/css" href="__DIR__{$dir}/css/buttons.css" />

	<style type="text/css">
		@-webkit-keyframes zhuan
		{
			0%
			{
				-webkit-transform:rotate(0deg);
			}

			100%
			{
				-webkit-transform:rotate(360deg);
			}
		}


		@-webkit-keyframes aa_out_bounce_left
		{
		    0%{
		        -webkit-transform:translateX(0)
		    }
		    20%{
		        -webkit-transform:translateX(20px)
		    }
		    100%{
		        -webkit-transform:translateX(-125px)
		    }
		}
		@-webkit-keyframes aa_in_bounce_center
		{
		    0%{
		        opacity:0;
		        -webkit-transform:scale(.3)
		    }
		    50%{
		        opacity:1;
		        -webkit-transform:scale(1.05)
		    }
		    70%{
		        -webkit-transform:scale(.9)
		    }
		    100%{
		        -webkit-transform:scale(1)
		    }
		}
		@-webkit-keyframes jinbi
		{
			from {-webkit-transform: rotateY(0deg);}
			to   {-webkit-transform: rotateY(180deg);}
		}
		.jubao-item
		{
			position: relative;
			float: left;
			width: 360px;
			height: 55px;
			top: 0px;
			font-size: 20px;
			line-height: 55px;
			margin-left: 20px;
			border-bottom: 1px solid #EBEBEB;
		}
		.jubao-radio
		{
			position: absolute;
			right: 10px;
			width: 25px;
			height: 25px;
			top: 20px;
		}

		.jubao-detail
		{
			position: relative;
			float: left;
			width: 360px;
			margin-left: 20px;
		}
		.jubao-detail textarea
		{
			width: 360px;
		    height: 80px;
		    font-size: 20px;
		    resize: none;
		    line-height: 40px;
		    border: none;
		    background-color: #eee;
		    border-radius: 10px;
		    padding-left: 10px;
		}
		@-webkit-keyframes guangzhu_ani
		{
			from  {-webkit-transform: scale(1);}
			to    {-webkit-transform: scale(1.05);}
		}
		@-webkit-keyframes che_ani
		{
		    0%    {-webkit-transform: translate(-20px,0px);opacity: 1}
		    8%  {-webkit-transform: translate(100px,0px) scale(0.95,1.05);opacity: 1}
		    10%  {-webkit-transform: translate(100px,0px) scale(1,1);opacity: 1}
		    12%   {-webkit-transform: translate(100px,0px); opacity: 1}
		    14%   {-webkit-transform: translate(100px,0px); opacity: 1}
		    16%   {-webkit-transform: translate(100px,0px); opacity: 1}
		    18%   {-webkit-transform: translate(100px,0px); opacity: 1}
		    20%   {-webkit-transform: translate(100px,0px); opacity: 1}
		    45%   {-webkit-transform: translate(100px,0px) scale(0.97,1.03); opacity: 1}
		    50%   {-webkit-transform: translate(100px,0px); opacity: 1}
		    60%   {-webkit-transform: translate(200px,0px); opacity: 0}
		    100%  {-webkit-transform: translate(200px,0px); opacity: 0}
		}
		@-webkit-keyframes che1_ani
		{
		    0%    {opacity: 1}
		    12%   {opacity: 1}
		    14%   {opacity: 0.5}
		    16%   {opacity: 1}
		    18%   {opacity: 0.5}
		    20%   {opacity: 1}
		    100%  {opacity: 1}

		}
		@-webkit-keyframes baoming
		{
		    0%  {opacity: 0}
		    58% {opacity: 0;-webkit-transform: scale(1.4);}
		    59% {opacity: 1;-webkit-transform: scale(1.4);}
		    70% {opacity: 1;-webkit-transform: scale(0.95);}
		    72% {opacity: 1;-webkit-transform: scale(1);}
		    80% {opacity: 0.8;-webkit-transform: scale(1.1);}
		    88% {opacity: 1;-webkit-transform: scale(1);}
		    93% {opacity: 0;-webkit-transform: scale(1.3);}
		    100%{opacity: 0}
		}
		@-webkit-keyframes shijia
		{
		    0%  {-webkit-transform: rotate(20deg) scale(0.8);opacity: 0}
		    10% {-webkit-transform: rotate(20deg) scale(0.75);opacity: 1}
		    20% {-webkit-transform: rotate(20deg) scale(0.85);}
		    28% {-webkit-transform: rotate(20deg) scale(0.75);}
		    38% {-webkit-transform: rotate(20deg) scale(0.85);}
		    47% {-webkit-transform: rotate(20deg) scale(0.75);opacity: 1}
		    55% {-webkit-transform: rotate(20deg) scale(0.90);opacity: 0}
		    100%{opacity: 0}

		}
		@-webkit-keyframes biaozhi_ani
		{
		    0%  {opacity: 0}
		    10% {opacity: 0}
		    20% {opacity: 1}
		    45% {opacity: 1}
		    55% {opacity: 0}
		    100%{opacity: 0}
		}
		#musicinfo
		{
			color: #fff;
			text-shadow: 1px 1px 2px #000;
			font-size: 15px;
			position: fixed;
			left: 432px;
		    top: 82px;
		    width: 60px;
		    height: 20px;
		    z-index: 100;
		    display: none;
		    opacity: 1;
		}
		@-webkit-keyframes heart_beating
		{
			from {opacity: 1;-webkit-transform: scale(1);}
			to   {opacity: 0.8;-webkit-transform: scale(0.8);}
		}
		@-webkit-keyframes heart1_moving
		{
			from  {opacity: 1;-webkit-transform: translate(0px,0px) scale(1);}
			to    {opacity: 0;-webkit-transform: translate(-20px,-50px) scale(1.5);}
		}
		@-webkit-keyframes heart2_moving
		{
			from  {opacity: 1;-webkit-transform: translate(0px,0px) scale(1);}
			to    {opacity: 0;-webkit-transform: translate(20px,-60px) scale(2);}
		}
		@-webkit-keyframes heart3_moving
		{
			from  {opacity: 1;-webkit-transform: translate(0px,0px) scale(1);}
			to    {opacity: 0;-webkit-transform: translate(70px,-40px) scale(2);}
		}
#enddiv
{
    position: absolute;
    width: 500px;
    height: 815px;
    background-color: rgba(0,0,0,0.7);
    z-index: 10000;
    display: none;
    opacity: 0;
}
#title_div
{
    width: 320px;
    height: 200px;
    left: 90px;
    top: 250px;
    color: #fff;
    font-size: 25px;
    position: relative;
    line-height: 45px;
    text-align: center;
    font-family: '微软雅黑';
    display:table;
}
#title_line
{
    position: absolute;
    width: 370px;
    height: 2px;
    background-color: #fff;
    top: 415px;
    left: 65px;
}
#reshowbtn
{
    position: absolute;
    width: 150px;
    height: 44px;
    border-radius: 10px;
    background-color: rgba(94,159,177,0.9);
    color: #fff;
    font-size: 22px;
    text-align: center;
    line-height: 44px;
    top: 446px;
    left: 74px;
}
#guanzhubtn
{
    position: absolute;
    width: 150px;
    height: 44px;
    border-radius: 10px;
    background-color: rgba(185,91,83,0.9);
    color: #fff;
    font-size: 22px;
    text-align: center;
    line-height: 44px;
    top: 446px;
    left: 268px;
}
@-webkit-keyframes fadein
{
	from  {opacity: 0}
	to    {opacity: 1}
}
	</style>

	
